//
//  BYMainController.m
//  BYDailyNews
//
//  Created by bassamyan on 15/1/17.
//  Copyright (c) 2015年 apple. All rights reserved.
//

#import "BYMainController.h"
#import "BYDetailsList.h"


@interface BYMainController ()

@property (nonatomic,strong) BYDetailsList *detailsList;

@end



@implementation BYMainController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    [self.navigationController.navigationBar setTranslucent:NO];
    [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
    [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"nav_bg"] forBarMetrics:UIBarMetricsDefault];
    
    //    NSMutableArray *listTop = [[NSMutableArray alloc] initWithArray:@[@"推荐",@"热点"]];
    NSMutableArray *listTop = [NSMutableArray array];
    NSMutableArray *listBottom = [[NSMutableArray alloc] initWithArray:@[@"杭州",@"社会",@"娱乐", @"科技",@"汽车",@"体育",@"订阅",@"财经",@"军事",@"国际",@"正能量",@"段子",@"趣图",@"美女",@"健康",@"教育",@"特卖",@"彩票",@"辟谣", @"电影",@"数码",@"时尚",@"奇葩",@"游戏",@"旅游",@"育儿",@"减肥",@"养生",@"美食",@"政务",@"历史",@"探索",@"故事",@"美文",@"情感",@"语录",@"美图",@"房产",@"家居",@"搞笑",@"星座",@"文化",@"毕业生",@"视频"]];
    
    self.detailsList = [[BYDetailsList alloc] initWithFrame:CGRectMake(0, 0, kScreenW, kScreenH-64)];
    self.detailsList.listAll = [NSMutableArray arrayWithObjects:listTop,listBottom, nil];
    self.detailsList.opertionFromItemBlock = ^(animateType type, NSString *itemName, int index){
        NSLog(@"index = %d", index);
        NSLog(@"type = %d", type);
        NSLog(@"itemName = %@", itemName);
        
        if (type == FromTopToBottomHead) { //由上到下，删除
            
        } else if (type == FromBottomToTopLast) { //由下到上，添加
            
        }
    };
    [self.view addSubview:self.detailsList];
}


@end
